Skip to content

cow: ratify the retry classification table against the upstream errorType enum - #464

Merged
mfw78 merged 1 commit into
dev/m1from
feat/m4-classification-ratify
Jul 23, 2026
Merged

cow: ratify the retry classification table against the upstream errorType enum#464
mfw78 merged 1 commit into
dev/m1from
feat/m4-classification-ratify

Conversation

@mfw78

@mfw78 mfw78 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What

Finish ratifying cow-venue/data/classification.toml: prune the phantom PriceExceedsMarketPrice row (absent from the real CoW errorType enum), reconcile the table against the upstream enum, and record the source-of-truth decision.

Why

The divergence rationale already sat in the table header; this closes it out with parity tests so the classification can't drift from the upstream enum.

Testing

Full gate green (fmt, check, clippy -D warnings, nextest, doctests).

AI Assistance

Implemented and red-teamed with Claude.

Closes #323.

@lgahdl lgahdl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean. Confirmed cowprotocol is correctly under [dev-dependencies] (not [dependencies]), matching the comment's claim that it's parity-test-only and never reaches a runtime/guest build. The removed PriceExceedsMarketPrice row is exactly what the new every_row_names_a_real_error_type test would have caught (phantom type not in the upstream enum). The second new test, divergence_from_upstream_is_exactly_the_ratified_set, is a well-designed drift guard — it projects the upstream retry_hint() into shepherd's model and pins the exact 5-entry divergence set, so either a future data edit or an upstream RetryHint change (including a hypothetical new variant, which the wildcard arm would correctly surface as new divergence) forces re-ratification rather than silently drifting. The old shepherd-sdk::cow::error test was correctly updated to drop the removed case. Approving.

@mfw78
mfw78 force-pushed the feat/m4-cow-event-abi-wits branch from 6b739d7 to 15b3a00 Compare July 23, 2026 01:53
Base automatically changed from feat/m4-cow-event-abi-wits to dev/m1 July 23, 2026 03:17
…Type enum

Prune the phantom PriceExceedsMarketPrice row, record the table (not
cowprotocol RetryHint) as the classification source of truth in the
data header, and pin the reconciliation with parity tests: every row
must name a real upstream errorType, and the divergence from
retry_hint() must be exactly the ratified set.
@mfw78
mfw78 force-pushed the feat/m4-classification-ratify branch from ef62240 to 95ea541 Compare July 23, 2026 03:20
@mfw78
mfw78 merged commit 675ee46 into dev/m1 Jul 23, 2026
7 checks passed
@mfw78
mfw78 deleted the feat/m4-classification-ratify branch July 23, 2026 04:34
mfw78 added a commit that referenced this pull request Jul 27, 2026
…Type enum (#464)

Prune the phantom PriceExceedsMarketPrice row, record the table (not
cowprotocol RetryHint) as the classification source of truth in the
data header, and pin the reconciliation with parity tests: every row
must name a real upstream errorType, and the divergence from
retry_hint() must be exactly the ratified set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants